package com.tdam2011.grupo06.model;

import java.util.Date;

import com.tdam2011.grupo06.R;

import android.app.Activity;
import android.graphics.drawable.Drawable;
import android.provider.CallLog;

public class Llamada extends ItemHistorial 
{
	public Llamada(int i, int ic, int ti, Date f, String n, String no)
	{
		super(i,ic,ti,f,n,no);
	}
	
	public Llamada()
	{
		super();
	}

	@Override
	public Drawable getTipoDrawable(Activity caller)
	{
		switch (tipo)
		{
			case CallLog.Calls.INCOMING_TYPE:
				return caller.getResources().getDrawable(R.drawable.ic_entrante);
			case CallLog.Calls.OUTGOING_TYPE:
				return caller.getResources().getDrawable(R.drawable.ic_saliente);
			case CallLog.Calls.MISSED_TYPE:
				return caller.getResources().getDrawable(R.drawable.ic_llamada_perdida);
			default:
				return null;
		
		}
	}
}
